package job;

/**
 * @author pingwen
 */
public class JobResult {
    private JobStatus status;
    private String message;
    private Throwable throwable;
    private long startTime;
    private long endTime;

    public JobStatus getStatus() {
        return status;
    }

    public void setStatus(JobStatus status) {
        this.status = status;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public long getStartTime() {
        return startTime;
    }

    public void setStartTime(long startTime) {
        this.startTime = startTime;
    }

    public long getEndTime() {
        return endTime;
    }

    public void setEndTime(long endTime) {
        this.endTime = endTime;
    }

    public Throwable getThrowable() {
		return throwable;
	}

	public void setThrowable(Throwable throwable) {
		this.throwable = throwable;
	}

	@Override
    public String toString() {
        final StringBuilder sb = new StringBuilder();
        sb.append("JobResult");
        sb.append("{status=").append(status);
        sb.append(", message='").append(message).append('\'');
        sb.append(", throwable=").append(throwable);
        sb.append(", startTime=").append(startTime);
        sb.append(", endTime=").append(endTime);
        sb.append('}');
        return sb.toString();
    }
}
